<?php
namespace app\api\model;


use app\model\Base;

class UserAlipay extends Base
{
    public function getStatusFormatAttr($value, $data)
    {
        $str = '';
        switch ($data['status']){
            case 'pending':
                $str = '审核中';
                break;
            case 'pass':
                $str = '初审中';
                break;
            case 'submit':
                $str = '已提交';
                break;
            case 'enabled':
                $str = '已通过';
                break;
            case 'disabled':
                $str = '已拒绝';
                break;
        }
        return $str;
    }

    public function getZmFormatAttr($value, $data)
    {
        $str = "";
        if(is_null($data['zm']) || $data['zm'] == ""){
            $str = "";
        }else{
            $str = 'http://mch.setplus.cn/white' . $data['zm'];
        }
        return $str;
    }

    public function getFmFormatAttr($value, $data)
    {
        $str = "";
        if(is_null($data['fm']) || $data['fm'] == ""){
            $str = "";
        }else{
            $str = 'http://mch.setplus.cn/white' . $data['fm'];
        }
        return $str;
    }
}